#pragma once
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif

#include <windows.h>
#include <winsock2.h>
#include <ws2tcpip.h>
#pragma comment(lib, "ws2_32.lib")
#define DEFAULT_BUFLEN 1024 * 16
//#define DEFAULT_PORT "29999"
#define DEFAULT_PORT "7787"

class ClientInfo
{
public:
	static const int SOCKET_SERVER = 0;
	static const int SOCKET_CLIENT = 1;
public:
	SOCKET mSocket;
	struct addrinfo *result;
	//bool killThread = false;
	
private:
	int initSocketServer();
	int initSocketClient();	
public:
	ClientInfo(int socketType);
	~ClientInfo(void);
};
